package org.aeon.gamechatnest.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * 角色权限表
 *
 * @TableName role_authority
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "角色权限表")
@TableName("role_authority")
public class RoleAuthority implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 权限id
     */
    @Schema(description = "权限id")
    @TableId
    @NotNull(message = "权限id不能为空")
    @Min(value = 1, message = "权限id不能小于1")
    private Long authorityId;
    /**
     * 角色id
     */
    @Schema(description = "角色id")
    @NotNull(message = "角色id不能为空")
    @Min(value = 1, message = "角色id不能小于1")
    private Long roleId;
}
